/*
 * @Author: NingJian
 * @Date: 2021-08-24 16:27:11
 * @LastEditTime: 2021-08-24 16:52:55
 * @LastEditors: NingJian
 * @Description: 
 * @FilePath: \musesdk\src\utils\utils.h
 * 
 */
#pragma once


#ifndef OS_LINUX
#include <filesystem>
namespace fs = fs;
#else
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif


struct ModelInfo {
    std::string path;
    int layers_numbers;
    int input_address;
    int input_size;
    int output_address;
    int output_size;
};


int write_pcie_file(CPcieComm &cpc,fs::path &file, int start_addr);


void write_signle_model(CPcieComm &cpc, fs::path &mp, int start_layer, ModelInfo & mi);

void write_full_model(CPcieComm &cpc, fs::path &mp, ModelInfo & mi);